package com.szpx.controller;


import com.szpx.entity.NewsShow;
import com.szpx.service.NewsShowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;


@RequestMapping("/news_show")
public class NewsShowController {
    @Autowired
    private NewsShowService newsShowService;

    @RequestMapping("/toNewShow")
    public String toNewsShow(HttpSession session, Model model){
        List<NewsShow> newsShowList = newsShowService.selectAllNewsShow();
        System.out.println(newsShowList.toString());
        model.addAttribute("late",newsShowList);
        return "/news/news_show";

    }

}
